<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>update goods</title>
</head>
<body style="text-align: center; margin: 0 auto;">
	<h1>update goods</h1>
	<form action="update" method="post">
		<select name="wid">
			<c:forEach items="${sessionScope.wares}" var="w">
				<c:if test="${w.id eq g.wid}">
					<option value="${w.id}" selected="selected">${w.addr}</option>
				</c:if>
				<c:if test="${w.id ne g.wid}">
					<option value="${w.id}">${w.addr}</option>
				</c:if>

			</c:forEach>
		</select> <br> <input type="hidden" name="id" value="${g.id}" />
		goodsname:&nbsp;<input type="text" name="name" value="${g.name}" /> <br />
		price:&nbsp;<input type="number" name="price" value="${g.price}"><br />
		number:&nbsp;<input type="number" name="num" value="${g.num}"><br />
		produceDate:&nbsp;<input type="date" name="pdate"
			value="<fmt:formatDate value="${g.pdate}" pattern="yyyy-MM-dd" />" /><br />
		<input type="submit" name="submit" />
	</form>
</body>
</html>